IOMMU/PCI: consolidate pdev_type() and cache its result for a given device
authorJan Beulich <jbeulich@suse.com>
Mon, 7 Jan 2013 11:54:39 +0000 (12:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 7 Jan 2013 11:54:39 +0000 (12:54 +0100)
commite7e08d86ad2fe984dccbe1a5673c33b3e118f12c
treeab3b8591f682cc23ff2bcccde3554a91cb1c6315
parentb9fba1286347e1648451c0992e043ae929e74459
IOMMU/PCI: consolidate pdev_type() and cache its result for a given device

Add an "unknown" device types as well as one for PCI-to-PCIe bridges
(the latter of which other IOMMU code with or without this patch
doesn't appear to handle properly).

Make sure we don't mistake a device for which we can't access its
config space as a legacy PCI device (after all we in fact don't know
how to deal with such a device, and hence shouldn't try to).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: "Zhang, Xiantao" <xiantao.zhang@intel.com>
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/xen/pci.h
xen/include/xen/pci_regs.h